<?php /* Smarty version Smarty-3.0.8, created on 2014-11-03 19:12:44
         compiled from "tpl/js/controller/setting-my-info.js" */ ?>
<?php /*%%SmartyHeaderCode:28875457632c446fa7-51016165%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7abd407dd1a203fe99f6052f42ccf1610e460728' => 
    array (
      0 => 'tpl/js/controller/setting-my-info.js',
      1 => 1410831884,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '28875457632c446fa7-51016165',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
      //个人信息设置
      App.controller("setting-my-info", function(page,data){
        $(page).on("appReady",function(){
          $("#username").text(kget("username"));
          $("#studentid").text(kget("studentid"));
          $.post("<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'user','a'=>'personInfo'),$_smarty_tpl);?>
",function(data){
            $("#QQ").val(data['QQ']) ;
            $("#email").val(data['email']);
            $("#telephone").val(data['telephone']);
          },"json");
          $(page).find(".ptime-login-button").on("tap",function(){

            $(this).text("修改中……");
            var v_this = $(this);
            var stuid=$("#studentid").text();
            var QQ=$("#QQ").val();
            var email=$("#email").val();
            var telephone=$("#telephone").val();

            $.post(url("user","editPerson"),{stuid:stuid,QQ:QQ,email:email,telephone:telephone},function(data){
              
              if(typeof(data.id) != "undefined"){
                App.load("setting-nav");
              }else{
                v_this.text("确定");
                alert(data.errmsg);
              }
            },"json");
          });
        });
      });